summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-10-11 23:55:17 +0200
committerGitHub <noreply@github.com>2023-10-11 23:55:17 +0200
commitda6824d9fd35ab19e4a9c51d0139add9fe127c13 (patch)
treed43aef2e9c83447f2bd6921d697c57e1709140af
parentMerge pull request #11740 from german77/shorcuts (diff)
parentci/linux: Fix find parameter order (diff)
downloadyuzu-da6824d9fd35ab19e4a9c51d0139add9fe127c13.tar
yuzu-da6824d9fd35ab19e4a9c51d0139add9fe127c13.tar.gz
yuzu-da6824d9fd35ab19e4a9c51d0139add9fe127c13.tar.bz2
yuzu-da6824d9fd35ab19e4a9c51d0139add9fe127c13.tar.lz
yuzu-da6824d9fd35ab19e4a9c51d0139add9fe127c13.tar.xz
yuzu-da6824d9fd35ab19e4a9c51d0139add9fe127c13.tar.zst
yuzu-da6824d9fd35ab19e4a9c51d0139add9fe127c13.zip
-rw-r--r--.ci/scripts/common/pre-upload.sh2
-rwxr-xr-x.ci/scripts/linux/docker.sh15
-rwxr-xr-x.ci/scripts/linux/upload.sh5
3 files changed, 20 insertions, 2 deletions
diff --git a/.ci/scripts/common/pre-upload.sh b/.ci/scripts/common/pre-upload.sh
index 705362a3c..3583f9840 100644
--- a/.ci/scripts/common/pre-upload.sh
+++ b/.ci/scripts/common/pre-upload.sh
@@ -5,6 +5,6 @@
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
GITREV="`git show -s --format='%h'`"
-ARTIFACTS_DIR="artifacts"
+ARTIFACTS_DIR="$PWD/artifacts"
mkdir -p "${ARTIFACTS_DIR}/"
diff --git a/.ci/scripts/linux/docker.sh b/.ci/scripts/linux/docker.sh
index e5d83d4b9..a16577b27 100755
--- a/.ci/scripts/linux/docker.sh
+++ b/.ci/scripts/linux/docker.sh
@@ -11,7 +11,7 @@ ccache -s
mkdir build || true && cd build
cmake .. \
-DBoost_USE_STATIC_LIBS=ON \
- -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
@@ -31,6 +31,19 @@ ccache -s
ctest -VV -C Release
+# Separate debug symbols from specified executables
+for EXE in yuzu; do
+ EXE_PATH="bin/$EXE"
+ # Copy debug symbols out
+ objcopy --only-keep-debug $EXE_PATH $EXE_PATH.debug
+ # Add debug link and strip debug symbols
+ objcopy -g --add-gnu-debuglink=$EXE_PATH.debug $EXE_PATH $EXE_PATH.out
+ # Overwrite original with stripped copy
+ mv $EXE_PATH.out $EXE_PATH
+done
+# Strip debug symbols from all executables
+find bin/ -type f -not -regex '.*.debug' -exec strip -g {} ';'
+
DESTDIR="$PWD/AppDir" ninja install
rm -vf AppDir/usr/bin/yuzu-cmd AppDir/usr/bin/yuzu-tester
diff --git a/.ci/scripts/linux/upload.sh b/.ci/scripts/linux/upload.sh
index e0f336427..fbb2d9c1b 100755
--- a/.ci/scripts/linux/upload.sh
+++ b/.ci/scripts/linux/upload.sh
@@ -59,4 +59,9 @@ if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ];
cp "build/${APPIMAGE_NAME}" "${DIR_NAME}/yuzu-${RELEASE_NAME}.AppImage"
fi
+# Copy debug symbols to artifacts
+cd build/bin
+tar $COMPRESSION_FLAGS "${ARTIFACTS_DIR}/${REV_NAME}-debug.tar.xz" *.debug
+cd -
+
. .ci/scripts/common/post-upload.sh